package top.hyz.hrm.client;

import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import top.hyz.hrm.AjaxResult;
import top.hyz.hrm.CourseDoc;
import top.hyz.hrm.hystrix.MyFallbackFactory;

/**
 * @InterfaceName IFeignService
 * @Description ES服务Feign网关
 * @Author 韩雨泽
 * @Date 2021/1/21-15:10
 * @Version 1.0
 */
@FeignClient(value = "HRM-ES-SERVER", fallbackFactory = MyFallbackFactory.class)
public interface IFeignClient {

    /**
     * 课程发布
     *
     * @param courseDoc 课程文档对象
     * @return ajaxResult
     */
    @RequestMapping(value = "/es/online", method = RequestMethod.POST)
    AjaxResult onLineCourse(@RequestBody CourseDoc courseDoc);
}
